<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateThirdpartyDevicesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('thirdparty_device', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//int 11 与tyw_thirdparty_industry中的id相关联
			$table->integer('industry_id');
			//varchar 255 设备名称
			$table->string('name');
			//int 11 设备台数
			$table->integer('num');
			//text 测试功能
			$table->text('functions');
			//double 精度范围中的最小值
			$table->double('minimize',13,2);
			//double 精度范围中的最大值
			$table->double('maximize',13,2);
			//varchar 255 制造商
			$table->string('creator');
			//timestamp 生产日期
			$table->timestamp('product_time');
			
			$table->softDeletes();
			
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('thirdparty_devices');
	}

}
